import axios from '../request';
import { Upload } from '../model/upload';

// base上传
export const uploadBase = (params: Upload) => {
  // 返回的数据格式可以和服务端约定
  return axios.post<any>(`api/base64`, params);
};
//获取令牌
export const getCloud = (format: string, type: string) => {
  // 返回的数据格式可以和服务端约定
  return axios.get<any>(`api/cloud/credential/${format}/${type}`, {});
};
export const fileLog = (params: String) => {
  // 返回的数据格式可以和服务端约定
  return axios.put<any>(`api/cloud/fileLog`, params);
};
